package com.gitee.mazhenggg.mall.point.web.service;

import com.gitee.mazhenggg.mall.point.domain.repository.PointRepository;
import com.gitee.mazhenggg.mall.point.domain.type.UserId;
import com.gitee.mazhenggg.mall.point.domain.type.Value;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class PointService {
    @Autowired
    PointRepository pointRepository;

    public Value getPointByUserId(UserId userId){
        return pointRepository.getPointByUserId(userId);
    }

    public void updatePointByUserId(UserId userId,Value amount){
        pointRepository.updatePointByUserId(userId,amount);
    }
}
